﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="Expires" content="86400" />
    <meta name="viewport" content="width=device-width, height=device-height" />
    <meta property="og:url" content="http://apptest12.saka-pon.net/KLibraryJS/DataBinding/OneWay.htm" />
    <meta property="og:type" content="website" />
    <meta property="og:site_name" content="Do Design : saka-pon.net" />
    <meta property="og:title" content="Data Binding (one-way)" />
    <meta property="og:description" content="データ バインディングのサンプルです。" />
    <meta property="og:image" content="http://storage.saka-pon.net/Samples/Bakery/Images/Thumbnails/cupcakes.jpg" />
    <meta property="og:locale" content="ja_JP" />
    <title>Data Binding (one-way)</title>
    <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js" type="text/javascript"></script>
    <script src="../Resources/Scripts/KLibrary-vsdoc.js" type="text/javascript"></script>
    <link href="../Resources/Styles/DataBinding.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <div class="page">
        <h1>Data Binding (one-way)</h1>
        <!--[if lt IE 9]>
        <div>Internet Explorer 9 以上でご覧ください。</div>
        <![endif]-->
        <div class="times" data-context="appModel"></div>
        <script type="text/plain">
            <div>
                <h3>日本</h3>
                <p>${Now:M/d HH:mm:ss}</p>
            </div>
            <div>
                <h3>協定世界時</h3>
                <p>${Now>toUTC:M/d HH:mm:ss}</p>
            </div>
            <div>
                <h3>米国西海岸 (夏時間)</h3>
                <p>${Now>toPSTSummer:M/d HH:mm:ss}</p>
            </div>
            <div>
                <h3>米国西海岸 (冬時間)</h3>
                <p>${Now>toPSTWinter:M/d HH:mm:ss}</p>
            </div>
        </script>
    </div>
    <script type="text/javascript">
        //<![CDATA[
        function toUTC(x) { return x.addHours(-9); }
        function toPSTSummer(x) { return x.addHours(-16); }
        function toPSTWinter(x) { return x.addHours(-17); }

        var appModel = { Now: new Date() };

        $(function () {
            $(document).bindData();

            setInterval(function () {
                appModel.Now = new Date();
            }, 1000);
        });
        //]]>
    </script>
</body>
</html>
